package com.demo.starter.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;

import javax.annotation.PostConstruct;

/**
 * @author cyj
 **/
@Slf4j
@Configuration
@ConditionalOnClass({RedisTemplate.class})
@ConditionalOnProperty({"service.starter.init.redis"})
public class InitRedisConfig {

    @PostConstruct
    public void init() {
        log.info("redis 初始化");
    }
}
